//
//  OwnerSubmitorderViewController.m
//  GoodWayClient
//
//  Created by newhuidong on 16/1/5.
//  Copyright © 2016年 HuiDong. All rights reserved.
//

#import "OwnerSubmitorderViewController.h"

@interface OwnerSubmitorderViewController ()
@property(nonatomic,strong)UIView * moveView;


@end

@implementation OwnerSubmitorderViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
}
-(void)viewWillAppear:(BOOL)animated{
    self.moveView=[[UIView alloc]initWithFrame:CGRectMake(0, 56, 5, 44*3)];
    self.moveView.backgroundColor=[UIColor orangeColor];
    [self.view addSubview:self.moveView];
     UIView *view1=[[UIView alloc]initWithFrame:CGRectMake(0, 56, 5, 44*3)
                    ];
    view1.backgroundColor=[UIColor lightGrayColor];
    [self.view addSubview:view1];
    
    UIView * view2=[[UIView alloc]initWithFrame:CGRectMake(0, 56+44*3+20, 5, 44*3)];
    view2.backgroundColor=[UIColor lightGrayColor];
    [self.view addSubview:view2];
    
    UIView * view3=[[UIView alloc]initWithFrame:CGRectMake(0, 56+44*6+44, 5, 44*3)];
    view3.backgroundColor=[UIColor lightGrayColor];
    [self.view addSubview:view3];

    [self.view bringSubviewToFront:self.moveView];
    
    
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    
    return 5;
}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    switch (indexPath.section) {
        case 0:{
//            [UIView beginAnimations:nil context:nil];
//            [UIView setAnimationBeginsFromCurrentState:YES];
//            [UIView setAnimationDuration:1.0f];
             self.moveView.frame=CGRectMake(0, 56, 5, 44*3);
//            [UIView commitAnimations];

            
        }
            break;
        case 1:{
//            [UIView beginAnimations:nil context:nil];
//            [UIView setAnimationBeginsFromCurrentState:YES];
//            [UIView setAnimationDuration:1.0f];
            self.moveView.frame=CGRectMake(0, 56+44*3+20, 5, 44*3);
//            [UIView commitAnimations];
            
            
        }
            break;
        case 2:{
//            [UIView beginAnimations:nil context:nil];
//            [UIView setAnimationBeginsFromCurrentState:YES];
//            [UIView setAnimationDuration:1.0f];
            self.moveView.frame = CGRectMake(0, 56+44*6+44, 5, 44*3);
//            [UIView commitAnimations];

        }
            break;
        default:
            break;
    }
    
}

@end

